{include file='../public_btn.html'}
<div class="html-box">
    <form class="cond-form clear" action="#!yunbuy/order" onsubmit="return xForm.submit(this)">
        <div class="f-unit">
            <select name="k" id="k">
                <option value="goods_name" {if $k eq 'goods_name'}selected{/if}>商品名称</option>
                <option value="username" {if $k eq 'username'}selected{/if}>会员名</option>
                <option value="order_sn" {if $k eq 'order_sn'}selected{/if}>订单号</option>
            </select>
            <input class="form-i w160 sitem" name="q" value="{$q}" type="text">
            <select name="status">
                <option value="">-{$L.unit_yun}状态-</option>
                <option value="1" {if $status eq 1}selected{/if}>未支付</option>
                <option value="2" {if $status eq 2}selected{/if}>进行中</option>
                <option value="3" {if $status eq 3}selected{/if}>已中奖</option>
                <option value="4" {if $status eq 4}selected{/if}>待揭晓</option>
                <option value="5" {if $status eq 5}selected{/if}>未中奖</option>
            </select>
            <select name="type">
                <option value="">-{$L.unit_yun}类型-</option>
                <option value="1" {if $type eq 1}selected{/if}>普通</option>
                <option value="2" {if $type eq 2}selected{/if}>{$L.unit_pay_points}</option>
            </select>
            <select name="is_award">
                <option value="">-是否领奖-</option>
                <option value="1" {if $is_award eq 1}selected{/if}>已领奖</option>
                <option value="2" {if $is_award eq 2}selected{/if}>未领奖</option>
            </select>
            <label class="ui-label">下单时间：</label>
            <input class="form-i w80 sitem" name="start_time" value="{get(start_time)}" type="text" onclick="WdatePicker()">
            <input style="margin-left:-1px" class="form-i w80 sitem" name="end_time" value="{get(end_time)}" type="text" onclick="WdatePicker()">
            <button type="submit" style="margin-left:10px; margin-top:1px" class="uiBtn BtnBlue">搜索</button>
        </div>
    </form>

    <table class="list">
        <thead>
            <tr>
                <th class="w30">ID</th>
                <th align="left">商品名称</th>
                <th>会员名</th>
                <th class="w120">商品总价</th>
                <th class="w120">单次售价</th>
                <th class="w120">参与人次</th>
                <th class="w80">状态</th>
                <th class="w80">{$L.unit_yun}时间</th>
                <th class="w100">操作</th>
            </tr>
        </thead>
        <tbody>
            {foreach from=$data.list item=m}
            <tr>
                <td class='id' align='center'>{$m.id}</td>
                <td>(第{$m.qishu}期) <a href="{$smarty.const.RootUrl}{'yunbuy/detail/'|cat:$m.buy_id}" target="_blank">{$m.goods_name}</a> {if $m.type eq 2}<span style="background: #00A47C; color: #fff; padding: 0 3px;">赠币专区</span>{/if}</td>
                <td align="center">{$m.username}</td>
                <td align="center">{$m.goods_price}</td>
                <td align="center">{$m.price}</td>
                <td align="center">{$m.qty}</td>
                <td align="center">{if $m.status eq 1}<span class="c-disable">未支付</span>{elseif $m.status eq 2}<span class="c-green">进行中</span>{elseif $m.status eq 3}<span class="c-red">已中奖</span>{elseif $m.status eq 4}<span class="c-orange">待揭晓</span>{elseif $m.status eq 5}<span class="c-gray">未中奖</span>{/if}</td>
                <td align="center">{$m.add_time|date_format:'Y-m-d H:i:s'}</td>
                <td class='opera' align='center' nowrap>
                    <a href='#!yunbuy/detail/?id={$m.id}&com=xshow|订单详细'>详情</a>
                    {if $m.is_show}
                    <a href='javascript:;' class='c-green' onclick='main.chang_status("{$m.id}","yundb","is_show","id")' title='点击设为隐藏'>显示</a>
                    {else}
                    <a href='javascript:;' class='c-red' onclick='main.chang_status("{$m.id}","yundb","is_show","id")' title='点击设为显示'>隐藏</a>
                    {/if}
                    {if $m.status eq 3 && $m.is_award eq 0}
                        {if $m.fdis}
                        <a href='javascript:;' class='c-green' onclick='main.chang_status("{$m.id}","yundb","fdis","id")' title='点击设为允许'>永不失效</a>
                        {else}
                        <a href='javascript:;' class='c-red' onclick='main.chang_status("{$m.id}","yundb","fdis","id")' title='点击设为永不失效'>允许失效</a>
                        {/if}
                    {/if}
                </td>
            </tr>
            {/foreach}
        </tbody>
    </table>
    <div class="foot-btn">
        <div class="pager r">{$page}</div>
    </div>

</div>

